package com.wwp.tbshop.presenter;

import com.wwp.tbshop.activity.cartactivity.InvoiceActivity;
import com.wwp.tbshop.model.bean.BaseBean;
import com.wwp.tbshop.model.bean.InvoiceInfoBean;

/**
 * Created by windows on 2017/6/20.
 */

public class InvoiceActivityPresenter extends BasePresenter {
    private InvoiceActivity mInvoiceActivity;

    public InvoiceActivityPresenter(InvoiceActivity invoiceActivity) {
        mInvoiceActivity = invoiceActivity;
    }

    @Override
    protected void onServerBug(int code) {

    }

    @Override
    protected void onConnectError(String message) {

    }

    @Override
    protected void onSuccess(BaseBean bean) {
        InvoiceInfoBean invoiceInfoBean = (InvoiceInfoBean) bean;
        if (invoiceInfoBean != null){
            mInvoiceActivity.getDataSuccess(invoiceInfoBean);
        }
    }
}
